const Koa = require('koa')
const bodyParser = require('koa-bodyparser')
const useRoutes = require('../utils/router')
const { errorHandler } = require('../middleware/error.middleware')

const app = new Koa()
app.use(errorHandler)
app.use(bodyParser())
useRoutes(app)

module.exports = app
